import Vue from 'vue'
import App from './App.vue'
import less from 'less'
import Vuex from 'vuex';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import { Table,Button, Select, } from 'element-ui';

Vue.config.productionTip = false;
Vue.use(ElementUI);
Vue.use(less)
Vue.component(Table.name, Table);
Vue.component(Button.name, Button);
Vue.component(Select.name, Select);


import Vant from 'vant';
import 'vant/lib/index.css';
import Router from 'vue-router'
const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return routerPush.call(this, location).catch(error=> error)
}
import store from "@/vuex/store";
axios.defaults.baseURL = '/api/'
//引入路由
import router from '@/router/index.js';
import axios from 'axios';
//引入iconfont
import './assets/iconfont/iconfont.css'
Vue.prototype.$axios=axios;
axios.defaults.timeout = 5000 // 请求超时

Vue.use(Vuex);
Vue.use(Vant);
Vue.use(Router);
axios.defaults.baseURL = '/api/'
Vue.config.productionTip = false;
axios.defaults.withCredentials = true



/*配置生产环境时，要打开*/
/*
axios.defaults.baseURL = 'http://121.36.26.104'*/


new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
